Cloud 端 安裝 (Minilize 2 Core / 2G up)
|-- k8s / kubeadm / kubectl / kubelet
|-- Docker
|-- OpenSSL
Edge 端 安裝 (樹梅派可安裝)
|-- Docker
|-- OpenSSL
# Install Docker CE
## Set up the repository:
### Install packages to allow apt to use a repository over HTTPS
apt-get update && apt-get install apt-transport-https ca-certificates curl software-properties-common
### Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
### Add Docker apt repository.
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
## Install Docker CE.
apt-get update && apt-get install docker-ce=18.06.2~ce~3-0~ubuntu
# Setup daemon.
cat > /etc/docker/daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
mkdir -p /etc/systemd/system/docker.service.d
# Restart docker.
systemctl daemon-reload
systemctl restart docker
apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
swapoff -a
kubeadm init --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
--insecure-bind-address=0.0.0.0
--insecure-port=8080
sudo -i
git clone https://github.com/kubeedge/kubeedge.git
cd kubeedge/build/tools
./certgen.sh genCertAndKey edge
ls /etc/kubeedge/ca
ls /etc/kubeedge/certs
3. 將cloud端鑰匙複製到Edge端(cloud與edge需使用同一把金鑰)
mkdir /etc/kubeedge/ca
mkdir /etc/kubeedge/certs
cd /root
wget https://github.com/kubeedge/kubeedge/releases/download/v0.3.0-beta.0/kubeedge-v0.3.0-beta.0-linux-amd64.tar.gz
tar zxvf kubeedge-v0.3.0-beta.0-linux-amd64.tar.gz